<?php
/**
 * Created by PhpStorm.
 * Muser: lvchy
 * Date: 2018/9/26
 * Time: 16:48
 */

namespace app\common\model;
use think\Model;
use traits\model\SoftDelete;

class SysOrder extends Model
{
    use SoftDelete;
    // 设置完整的数据表（包含前缀）
    protected $table = 'sys_order';
    protected $deleteTime = 'delete_time';
    protected $hidden = ['delete_time'];

    /*public function getFileSizeAttr($name){
        if($name < 1024){
            return $name.'b';
        }elseif (round($name/1024,2) < 1024){
            return round($name/1024,2).'Kb';
        }else{
            return round($name/1024/1024,2).'Mb';
        }
    }*/
    public function getSureUserNameAttr($name){
        return $name?:'';
    }
    public function getCommonAttr($name){
        return $name?:'';
    }
}